package com.website.view.menu
{
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;

    public class MenuBtn extends Sprite
    {
        public var btnOver:Sprite;
        public var idNum:Number;
        public var field:TextField;

        public function MenuBtn(lable:String)
        {
            var textFormat:TextFormat = new TextFormat();
//            textFormat.font = new HelveticaBoldEmbed().fontName;
            textFormat.size = 14;
            textFormat.letterSpacing = 0;
            textFormat.leftMargin = 0;
            textFormat.rightMargin = 0;
            textFormat.color = "0xBEBEBE";
            btnOver = new Sprite();
            btnOver.useHandCursor = true;
            btnOver.mouseEnabled = true;
            btnOver.buttonMode = true;
            btnOver.graphics.beginFill(0xFFFAAA, 0);
            btnOver.graphics.drawRect(0, 0, 1, 1);
            btnOver.graphics.endFill();
            addChild(btnOver);
            field = new TextField();
            field.name = "field";
            field.autoSize = "left";
            field.antiAliasType = AntiAliasType.ADVANCED;
            field.gridFitType = GridFitType.PIXEL;
            field.selectable = false;
//            field.embedFonts = true;
            field.defaultTextFormat = textFormat;
            field.text = lable;
            addChild(field);
        }

        public function updateField(param1:String) : void
        {
            field.text = param1;
            return;
        }

    }
}
